﻿<div class="vsm-spinner @(IsLoading ? "on" : "")">
    <div class="overlay"></div>
    <div class="spanner">
      <div class="loader"></div>
      <p>@WaitText</p>
    </div>
</div>

@code {
    private bool IsLoading { get; set; } = false;

    [Parameter]
    public string WaitText { get; set; } = "正 在 处 理 中 ...";

    public void Toggle()
    {
        IsLoading = !IsLoading;
        InvokeAsync(StateHasChanged);
    }
}